import { Component } from 'react';
import DChild from './DChild'; 

export default class DParent extends Component {
	state = {
		msg1: 'h111',
		msg2: 'h222',
	}
	pFn = () => {
		console.log('DParent', this.state);
	}
	// 渲染函数
    render() {
    	return (
			<div>
			    <div>DParent:</div>
				<DChild fntest={this.pFn} ms1={this.state.msg1} ms2={this.state.msg2}></DChild>
			</div>
		);
    }
};
